#ifndef __CONTROLMANAGER_H_
#define __CONTROLMANAGER_H_
#include "j_includes.h"
#include "x_service.h"
#include "RymcHelper.h"

#define MAX_READ_SIZE 1024

class CControlManager : public CXService<CControlManager>
{
public:
	CControlManager();
	~CControlManager();

public:
	///CXService
	virtual int OnAccept(int nSocket);
	virtual int OnRead(int nSocket);
	virtual int OnWrite(int nSocket);
	virtual int OnBroken(int nSocket);
	virtual int GetSocketByResid(const char *pResid){ return 0; }

	///CStreamManager
	int StartService(int nPort = 8000);
	int StopService();
private:
	CRymcHelper m_rymcHelper;
};

#endif //~__CONTROLMANAGER_H_
